package com.example.mylibrarybase.yumengmeng03.ui;

import android.os.Bundle;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.example.mylibrarybase.R;
import com.example.mylibrarybase.bar.initAction_Bar;
import com.example.mylibrarybase.base.baseui.BaseActivity;
import com.example.mylibrarybase.utils.LogUtils;
import com.example.mylibrarybase.yumengmeng03.bean.itemClass_03;
import com.example.mylibrarybase.yumengmeng03.utils.UtiilsCodes_3;
import com.example.mylibrarybase.yumengmeng03.view.TopTabBar_3;

import java.util.ArrayList;

public class Bottom_navigation_bar_Activity_03 extends BaseActivity implements TopTabBar_3.CallBack  {
    private LinearLayout mBottom_navigation_bar_activity_ll;
    private TopTabBar_3 mTop_tab_bar;
    private initAction_Bar mBase_action_bar;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initView();
    }

    @Override
    public int getlayouXML() {
        return R.layout.activity_bottom_navigation_bar__3;
    }

    @Override
    public void initView() {
        mBase_action_bar = (initAction_Bar) findViewById(R.id.base_action_bar);
        mBase_action_bar
                .setMode(initAction_Bar.AUTO_ONCLICK_MODE)
                .setCallBack(new initAction_Bar.Action_bar_call_back() {
                    @Override
                    public void getAction_barView_backbutton(TextView textView) {
                        textView.setText("返回");
                    }

                    @Override
                    public void getAction_barView_backbutton_icon(ImageView imageView) {

                    }

                    @Override
                    public void getAction_barView_title(TextView textView) {
                        textView.setText("图片轮播放大缩小");
                    }

                    @Override
                    public void getAction_barView_right_icon(ImageView imageView) {

                    }
                });

        mTop_tab_bar = (TopTabBar_3) findViewById(R.id.TopTabBar_03);
        mTop_tab_bar.setCallBack(this);
          mBottom_navigation_bar_activity_ll = (LinearLayout) findViewById(R.id.Bottom_navigation_bar_Activity_ll);
        initData();
    }

    @Override
    public void initData() {
        ArrayList<itemClass_03> itemClasses = new ArrayList<>();
        for (int i = 0; i < 4; i++) {
            itemClasses.add(new itemClass_03("item" + i, "" + i, "" + i, "" + i));
        }
        UtiilsCodes_3.AutoCodes(this, itemClasses, mBottom_navigation_bar_activity_ll, new UtiilsCodes_3.CallBack() {
            @Override
            public void checed(itemClass_03 tag) {
                LogUtils.i("被点击的按钮里面的内容"+tag);
            }
        });
    }

    @Override
    public void onClickItemNum(int i) {
        LogUtils.i("我点的头号码是多少"+i);
    }

}
